<?php
/**
 * -----------------------------------------------------------------------
 * @package VirtueMart
 * @subpackage Payment
 * @Copyright (C) 2011 Mikkel Elmholdt
 *
 * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
 * VirtueMart is Free Software.
 * VirtueMart comes with absolute no warranty.
 *
 * www.virtuemart.net
 *
 * -----------------------------------------------------------------------
 *
 * This module contains the final payment call code for the Quickpay
 * Payment Gateway (www.quickpay.dk).
 *
 * The module will invoke the external popup dialog from Quickpay when
 * the user accepts the purchase.
 *
 * -----------------------------------------------------------------------
 */

if (!defined('_VALID_MOS') && !defined('_JEXEC')) die('Direct Access to ' . basename(__FILE__) . ' is not allowed.');

require_once (CLASSPATH . "payment/ps_quickpay.cfg.php");

$order_id = $_REQUEST["order_id"];

if ($_REQUEST["msg"] == "success") {
?>
     <img src="<?php
    echo VM_THEMEURL ?>images/button_ok.png" align="middle" alt="Success" border="0" />
     <h2><?php
    echo $VM_LANG->_('PHPSHOP_PAYMENT_TRANSACTION_SUCCESS'); ?></h2>
<?php
} else {
?>
     <img src="<?php
    echo VM_THEMEURL ?>images/button_cancel.png" align="middle" alt="<?php
    echo $VM_LANG->_('VM_CHECKOUT_FAILURE'); ?>" border="0" />
     <h2><span class="message"><?php
    echo $VM_LANG->_('PHPSHOP_PAYMENT_ERROR') ?></span></h2>    
<?php
}
?>
<br />
<p><a href="index.php?option=com_virtuemart&page=account.order_details&order_id=<?php
echo $order_id ?>">
<?php
echo $VM_LANG->_('PHPSHOP_ORDER_LINK') ?></a></p>

<!-- Google Conversion Code -->
<script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = 123456789;
var google_conversion_language = "da";
var google_conversion_format = "2";
var google_conversion_color = "ffffff";
var google_conversion_label = "xyz";
var google_conversion_value = 0;
/* ]]> */
</script>
<script type="text/javascript" src="http://www.googleadservices.com/pagead/conversion.js">
</script>
<noscript>
<div style="display:inline;">
<img height="1" width="1" style="border-style:none;" alt="" src="http://www.googleadservices.com/pagead/conversion/123456789/?label=xyz&amp;guid=ON&amp;script=0"/>
</div>
</noscript>
